home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Freeware 2002 November
/
SGI Freeware 2002 November - Disc 3.iso
/
dist
/
fw_openssh.idb
/
tmp
/
check-ssh-config.z
/
check-ssh-config
Wrap
Text File
|
2002-07-08
|
1KB
|
46 lines
#!/bin/sh -fb
# Time-stamp: "Sat 29 Jun 2002, 11:51:59 EDT by drk@sgi.com (David Kaelbling)"
#
# Test to see whether the sshd user exists, and complain if it doesn't.
# Also warn about disabling a running sshd, in case that's the only
# way of logging in to the system.
config=fw_sshd
user=sshd
daemon=sshd
# If we return bad status inst will complain about a failing exitop,
# and hopefully the installer will actually read our messages.
status=0
if ! /sbin/grep -q "^${user}:" /etc/passwd; then
echo "";
echo "**** WARNING ****"
echo "There does not appear to be an '$user' user on this system."
echo "The fw_openssh daemon $daemon will _not_ be usable unless you"
echo "either create one or disable UsePrivilegeSeparation. You"
echo "should fix this and 'chkconfig $config on' before restarting"
echo "See /usr/freeware/relnotes/openssh.html for more information."
echo "";
status=1
elif ! /sbin/chkconfig $config && \
(/sbin/ps -ef | /sbin/grep -v grep | /sbin/grep -q $daemon); then
echo "";
echo "**** WARNING ****"
echo "It looks like you are currently running $daemon. fw_openssh $daemon"
echo "is disabled by default. You may want to 'chkconfig $config on'"
echo "before restarting."
echo "";
status=1
fi
# Try to delete ourself if we're running from /tmp.
if [ -x "$0" ]; then
case "$0" in
/tmp/*) rm "$0";;
esac
fi
exit $status